Reading the array elements in 2D array